class cleantalkSkinRegister extends skin_register(~id~)
{
    public function registerForm($general_errors, $data, $inline_errors, $time_select, $custom_fields, $nexusFields, $nexusStates)
    {
	$IPBHTML = '';
	if(ipsRegistry::$settings['cleantalk_enabled']){
	    session_name('cleantalksession');
	    if (!isset($_SESSION)) {
		session_start();
	    }
	    $_SESSION['formtime'] = time();
	    $form_id = 'register';
	    $IPBHTML = "\n";
	    $IPBHTML .= '<script type="text/javascript">{' . "\n";
	    $IPBHTML .= 'form = document.getElementById("' . $form_id. '");' . "\n";
	    $IPBHTML .= 'if(form){' . "\n";
	    $IPBHTML .= "\t" . 'e_in = document.createElement("INPUT");' . "\n";
	    $IPBHTML .= "\t" . 'e_in.setAttribute("type", "hidden");' . "\n";
	    $IPBHTML .= "\t" . 'e_in.setAttribute("id", "ct_checkjs");' . "\n";
	    $IPBHTML .= "\t" . 'e_in.setAttribute("name", "ct_checkjs");' . "\n";
	    $IPBHTML .= "\t" . 'e_in.setAttribute("value", "1");' . "\n";
	    $IPBHTML .= "\t" . 'form.appendChild(e_in);' . "\n";
	    $IPBHTML .= '}' . "\n";
	    $IPBHTML .= '}</script>' . "\n\n";
	}
	
	return parent::registerForm($general_errors, $data, $inline_errors, $time_select, $custom_fields, $nexusFields, $nexusStates) . $IPBHTML;
    }
}
